package zero.lex;

public class Token {
    // 种别码
    private int    id;
    // token 的内容
    private String content;
    // 行号
    private int    lineNo;
    // 列号
    private int    columnNo;

    public Token() {

    }

    public Token(int id, String content, int lineNo, int columnNo) {
        this.id       = id;
        this.content  = content;
        this.lineNo   = lineNo;
        this.columnNo = columnNo;
    }
    
    @Override
    public String toString() {
        return "line " + lineNo + " column " + columnNo + " " + content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getLineNo() {
        return lineNo;
    }

    public void setLineNo(int lineNo) {
        this.lineNo = lineNo;
    }

    public int getColumnNo() {
        return columnNo;
    }

    public void setColumnNo(int columnNo) {
        this.columnNo = columnNo;
    }
}
